<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('设备历史记录详情')"/>
    <th:block th:include="include :: select2-css"/>
    <th:block th:include="include :: jquery-smartwizard-css"/>
    <link rel="stylesheet" th:href="@{/web/talents/css/talents.css}"/>
    <style>
        .ibox-content {
            padding-top: 20px;
        }

        .details_div {
            width: 33.3%;
            height: auto;
            float: left;
        }

        .details_div2 {
            width: 66.6%;
            height: auto;
            float: left;
        }

        .details_p {
            font-family: 'PingFangSC-Regular', 'PingFang SC', sans-serif;
            font-weight: 400;
            font-style: normal;
            font-size: 14px;
            text-align: right;
            padding-left: 20px;
        }

        .row {

            padding-top: 5px;
        }

        .title2 {

            height: 40px;
            line-height: 40px;
            font-size: 16px;
            padding-left: 30px;


        }
    </style>
</head>
<body>
<div class="main-content">
    <div class="card">
        <div class="card-header">
            <h5 class="card-title mb-0">
                设备参数详情
                <input name="deviceType" type="hidden" th:value="${device.deviceType}" id="deviceType"/>
            </h5>
            <div class="card-actions"> <label style="font-size: 12px">创建时间:<span
                    th:text="${#dates.format(device.createTime, 'yyyy-MM-dd HH:mm:ss')}"></span></label></div>
        </div>
        <div class="card-body">
            <div class="ibox-content">
                <div class="info_business">
                    <p class="info_business_tit" style="border-left: 3px solid red;text-indent: 10px;" th:text="设备信息"></p>
                </div>
                <br>
                <div style="width: 100%">
                    <div class="details_div">
                        <div class="row">
                            <label class="details_p">设备名称：<span th:text="${device.deviceName}"></span></label>
                        </div>
                        <div class="row">
                            <label class="details_p">设备编号：<span th:text="${device.deviceno}"></span></label>
                        </div>
                        <div class="row">
                            <label class="details_p">设备类型：

                                <span th:text="${device.deviceType}"></span> </label>
                        </div>
                        <div class="row">
                            <label class="details_p">设备状态：
                                <span th:text="${device.deviceStatus}"></span> </label>
                        </div>
                    </div>
                    <div class="clearfix"></div>
                </div>


            </div>
            <!-- 设备参数信息 -->
            <div class="ibox-content" id="param">
                <div class="info_business">
                    <p class="info_business_tit" style="border-left: 3px solid red;text-indent: 10px;"  th:text="设备参数信息"></p>
                </div>
                <br>

                <div style="width: 100%" id="armParam">
                    <div class="details_div">
                        <div class="row">
                            <label class="details_p">转速：<span th:text="${armParam?.rev}"></span></label>
                        </div>
                        <div class="row">
                            <label class="details_p">1轴：<span th:text="${armParam?.one}"></span></label>
                        </div>
                    </div>
                    <div class="details_div">

                        <div class="row">
                            <label class="details_p">2轴：<span th:text="${armParam?.two}"></span></label>
                        </div>
                        <div class="row">
                            <label class="details_p">3轴：<span th:text="${armParam?.three}"></span></label>
                        </div>
                    </div>
                    <div class="details_div">

                        <div class="row">
                            <label class="details_p">4轴：<span th:text="${armParam?.four}"></span></label>
                        </div>
                        <div class="row">
                            <label class="details_p">5轴：<span th:text="${armParam?.five}"></span></label>
                        </div>
                    </div>
                    <div class="details_div">

                        <div class="row">
                            <label class="details_p">6轴：<span th:text="${armParam?.six}"></span></label>
                        </div>
                    </div>

                    <div class="clearfix"></div>
                </div>
            </div>
            <!-- 设备参数信息 -->

            <!--机床参数信息-->
            <div style="width: 100%" id="machineParam">
                <div class="details_div">
                    <div class="row">
                        <label class="details_p">产量：<span th:text="${machineParam?.production}"></span></label>
                    </div>
                    <div class="row">
                        <label class="details_p">循环节拍：<span th:text="${machineParam?.loopMeter}"></span></label>
                    </div>

                </div>
                <div class="details_div">
                    <div class="row">
                        <label class="details_p">X轴电机温度：<span th:text="${machineParam?.xMotoTemperature}"></span></label>
                    </div>
                    <div class="row">
                        <label class="details_p">X轴电机负载：<span th:text="${machineParam?.xMotoLoad}"></span></label>
                    </div>
                </div>
                <div class="details_div">
                    <div class="row">
                        <label class="details_p">主轴电机温度：<span th:text="${machineParam?.justfyMotoTemperature}"></span></label>
                    </div>
                    <div class="row">
                        <label class="details_p">主轴电机负载：<span th:text="${machineParam?.justfyMotoLoad}"></span></label>
                    </div>
                </div>
                <div class="details_div">
                    <div class="row">
                        <label class="details_p">切削时间：<span th:text="${machineParam?.cutTime}">秒</span></label>
                    </div>
                    <div class="row">
                        <label class="details_p">加工时间：<span th:text="${machineParam?.processTime}"> 秒</span></label>
                    </div>
                </div>
                <div class="details_div" >

                    <div class="row">
                        <label class="details_p">开机时间：<span th:text="${machineParam?.startTime}">秒</span></label>
                    </div>

                    <div class="row">
                        <label class="details_p">运行时间：<span th:text="${machineParam?.runTime}">秒</span></label>
                    </div>
                </div>
                <div class="clearfix"></div>
            </div>
            <!--机床参数信息-->
            <div>
                <div class="btn-action-wrap">
                    <button type="button" class="btn btn-sm btn-secondary" onclick="closeItem()"><i class="fa fa-times"></i> 关 闭
                    </button>
                </div>
            </div>
        </div>
    </div>

</div>




<th:block th:include="include :: footer"/>
<th:block th:include="include :: select2-js"/>
<th:block th:include="include :: jquery-smartwizard-js"/>
<script th:inline="javascript">
    $(function () {
        $("#machineParam").hide();
        $("#armParam").hide();

        $("#param").hide();
        if($("#deviceType").val() == "数控机床"){
            $("#param").show();
            $("#machineParam").show();
            $("#armParam").hide();
        }else if ($("#deviceType").val() == "机械臂"){
            $("#param").show();
            $("#machineParam").hide();
            $("#armParam").show();
        }
    });
</script>
</body>
</html>
